import React, {Component} from 'react';

class Hot extends Component {
    constructor(props) {
        super(props);
        //使用params传值,就是通过this.props.match.params来获取params对象!!!
        console.log(this.props.match.params)
        this.state={
            gf:JSON.parse(this.props.match.params.gf)
        }
    }
    render() {
        return (
            <div>
                <h1>这是热门</h1>
                <h2>id是{this.props.match.params.age}名字是{this.props.match.params.name}</h2>
                <h1>{this.state.gf.name}</h1>
            </div>
        );
    }
}

export default Hot;